package com.bank.backend.boot.base.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 交易表
 * @TableName trade
 */
@TableName(value ="trade")
@Data
public class Trade implements Serializable {
    /**
     * 交易id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 发送账户id
     */
    @TableField(value = "send_aid")
    private Long sendAid;

    /**
     * 接收账户id
     */
    @TableField(value = "receive_aid")
    private Long receiveAid;

    /**
     * 交易金额
     */
    @TableField(value = "amount")
    private Double amount;

    /**
     * 交易时间
     */
    @TableField(value = "trade_time")
    private Date tradeTime;

    /**
     * 交易完成时间
     */

    @TableField(value = "finish_time")
    private Date finishTime;

    /**
     * 交易类型
     */
    @TableField(value = "type")
    private Integer type;

    /**
     * 交易位置
     */
    @TableField(value = "location")
    private String location;

    /**
     * 交易设备
     */
    @TableField(value = "equipment")
    private String equipment;

    /**
     * 风险等级 0-正常，1-低风险，2-中风险，3-高
     */
    @TableField(value = "risk")
    private Integer risk;

    /**
     * 交易是否完成,0-未完成,1-完成
     */
    @TableField(value = "finish")
    private Integer finish;

    @TableField(value = "probability")
    private Double probability;

    @TableField(value = "description")
    private String description;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time")
    private Date updateTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}